home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
001a
/
dsemp481.zip
/
DSEMP481
Wrap
Text File
|
1993-02-19
|
35KB
|
1,316 lines
diff +context dosemu0.48/Makefile dosemu0.48p1/Makefile
*** dosemu0.48/Makefile Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/Makefile Thu Feb 18 19:23:07 1993
***************
*** 12,17 ****
--- 12,21 ----
# just do "make disks" then a "make all" (or "make install") to rebuild
# the emulator after changing the FLOPPY_CONFIG variable.
+ # DON'T CHANGE THIS: this makes libemu start high enough to be safe. should be
+ # okay at...0x10000000 for 1 GB mark. nobody should ever use 1 GB on a PC.
+ LIBSTART = 0x10000000
+
# path to your compiler's shared libraries
#
# IF YOU ARE NOT USING GCC 2.3.3, ENSURE THAT THE FOLLOWING LINE
***************
*** 33,39 ****
#
# VIDEO_CARD
# choose the correct one for your machine.
! # currently, VGA/EGA/CGA are synonomous
#
VIDEO_CARD = -DVGA_VIDEO
--- 37,44 ----
#
# VIDEO_CARD
# choose the correct one for your machine.
! # currently, VGA/EGA/CGA are synonomous, and MDA is untested :-)
! # I'd like to hear if it works for you (gt8134b@prism.gatech.edu)
#
VIDEO_CARD = -DVGA_VIDEO
***************
*** 45,51 ****
# KEYBOARD
# choose the proper RAW-mode keyboard
! # nationality
#
KEYBOARD = -DKBD_US -DKBDFLAGS=0
--- 50,57 ----
# KEYBOARD
# choose the proper RAW-mode keyboard
! # nationality...foreign keyboards are probably not
! # well-supported because of lack of dead-key/diacritical code
#
KEYBOARD = -DKBD_US -DKBDFLAGS=0
***************
*** 68,76 ****
# DISKS
- # choose fron one of the standard configs,
- # or put together one of your own. Leave
- # only one FLOPPY_CONFIG line uncommented!
#
# these are the DEFault numbers of disks
# note that LINUX.EXE will fail if there are more than two
--- 74,79 ----
***************
*** 144,155 ****
#
XMS = -DXMS=1
XMSOBS = xms.o
! MAX_XMS = 3072
#
# SYNC_ALOT
! # uncomment this if the emulator is crashing and some debug info isn't
! # being written to the file
# SYNC_ALOT = -DSYNC_ALOT=1
--- 147,158 ----
#
XMS = -DXMS=1
XMSOBS = xms.o
! MAX_XMS = 4096 # max 4 megs XMS
#
# SYNC_ALOT
! # uncomment this if the emulator is crashing your machine and some debug info
! # isn't being sync'd to the debug file (stdout). shouldn't happen. :-)
# SYNC_ALOT = -DSYNC_ALOT=1
***************
*** 167,181 ****
CONFIGS = $(KEYBOARD) $(PHANTOMDIR) $(VIDEO_CARD) $(MATHCO)
DEBUG = $(SYNC_ALOT)
DISKS = $(NUM_DISKS) $(FLOPPY_CONFIG)
! CFLAGS = $(DEFINES) $(CONFIGS) $(OPTIONAL) $(DEBUG) $(DISKS) #-O6 -Wall
all: dos libemu
! dos: dos.c
! $(CC) -N -o $@ $<
libemu: $(OBJS)
! ld -T 400000 -o $@ $(OBJS) $(SHLIBS) -lc -ltermcap
clean:
rm -f $(OBJS) $(GFXOBS) $(XMSOBS) dos libemu *.s core
--- 170,185 ----
CONFIGS = $(KEYBOARD) $(PHANTOMDIR) $(VIDEO_CARD) $(MATHCO)
DEBUG = $(SYNC_ALOT)
DISKS = $(NUM_DISKS) $(FLOPPY_CONFIG)
! CFLAGS = $(DEFINES) $(CONFIGS) $(OPTIONAL) $(DEBUG) $(DISKS) \
! -DLIBSTART=$(LIBSTART) # -O6 -Wall
all: dos libemu
! dos: dos.c Makefile
! $(CC) -N -DLIBSTART=$(LIBSTART) -o $@ $<
libemu: $(OBJS)
! ld -T $(LIBSTART) -o $@ $(OBJS) $(SHLIBS) -lc -ltermcap
clean:
rm -f $(OBJS) $(GFXOBS) $(XMSOBS) dos libemu *.s core
***************
*** 201,207 ****
@echo "FINAL TAR.Z FILE:"
@ls -l /tmp/dosemu0.48.tar.Z
! emu.o: emu.h dosvga.h xms.h timers.h Makefile
linuxfs.o: emu.h
termio.o: emu.h termio.h dosvga.h
disks.o: emu.h Makefile
--- 205,211 ----
@echo "FINAL TAR.Z FILE:"
@ls -l /tmp/dosemu0.48.tar.Z
! emu.o: emu.h dosvga.h xms.h timers.h cmos.h Makefile
linuxfs.o: emu.h
termio.o: emu.h termio.h dosvga.h
disks.o: emu.h Makefile
***************
*** 209,212 ****
dosvga.o: emu.h dosvga.h
xms.o: emu.h xms.h Makefile
timers.o: emu.h timers.h
! cmos.o: emu.h cmos.h
--- 213,216 ----
dosvga.o: emu.h dosvga.h
xms.o: emu.h xms.h Makefile
timers.o: emu.h timers.h
! cmos.o: emu.h cmos.h Makefile
diff +context dosemu0.48/README dosemu0.48p1/README
*** dosemu0.48/README Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/README Thu Feb 18 19:12:15 1993
***************
*** 88,90 ****
--- 88,91 ----
(This address was often unreachable, and Matthias seems to have left
the university. He seems to have no net access now.
-Robert)
+
diff +context dosemu0.48/README.first dosemu0.48p1/README.first
*** dosemu0.48/README.first Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/README.first Thu Feb 18 19:12:15 1993
***************
*** 1,6 ****
========================== DOS EMULATOR 0.48 ===========================
Robert Sanders gt8134b@prism.gatech.edu
! $Header: /usr/src/dos/RCS/README.first,v 1.4 1993/02/16 00:21:29 root Exp $
========================================================================
January 27, 1993 0.47
--- 1,6 ----
========================== DOS EMULATOR 0.48 ===========================
Robert Sanders gt8134b@prism.gatech.edu
! $Header: /usr/src/dos/RCS/README.first,v 1.5 1993/02/18 18:53:41 root Exp $
========================================================================
January 27, 1993 0.47
***************
*** 467,474 ****
problems that you find. They are more helpful to me than descriptions
alone.
! DR-DOS 6.0 apparently works under the emulator now. If you have any
! problems, write me.
People have had some success using Stacker and SuperStor to access
their compressed "partitions" under the emulator. I don't have either
--- 467,475 ----
problems that you find. They are more helpful to me than descriptions
alone.
! DR-DOS 6.0 apparently works under the emulator now. I have been told that,
! because it uses a variety of temporary files, your boot disk (whataver it
! may be) should be un-write-protected. If you have any problems, write me.
People have had some success using Stacker and SuperStor to access
their compressed "partitions" under the emulator. I don't have either
***************
*** 484,490 ****
Here are some programs that are reported to work:
DR-DOS 6.0, SuperStor, Stacker, uEmacs (don't even think about demacs!),
Minitab, the Big Mouth Voicemail card (Ed Carp, erc@apple.com posted
! some patches to get it to work)
Things that almost work:
Currently, I'm trying to coax QBASIC/EDIT into working. They do
--- 485,491 ----
Here are some programs that are reported to work:
DR-DOS 6.0, SuperStor, Stacker, uEmacs (don't even think about demacs!),
Minitab, the Big Mouth Voicemail card (Ed Carp, erc@apple.com posted
! some patches to get it to work), Managing Your Money
Things that almost work:
Currently, I'm trying to coax QBASIC/EDIT into working. They do
***************
*** 586,590 ****
--- 587,592 ----
Robert Sanders
gt8134b@prism.gatech.edu
+
diff +context dosemu0.48/cmos.c dosemu0.48p1/cmos.c
*** dosemu0.48/cmos.c Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/cmos.c Thu Feb 18 19:12:14 1993
***************
*** 1,9 ****
/* cmos.c, for DOSEMU
* by Robert Sanders, gt8134b@prism.gatech.edu
*
! * $Date: 1993/02/16 00:21:29 $
* $Source: /usr/src/dos/RCS/cmos.c,v $
! * $Revision: 1.2 $
* $State: Exp $
*/
--- 1,9 ----
/* cmos.c, for DOSEMU
* by Robert Sanders, gt8134b@prism.gatech.edu
*
! * $Date: 1993/02/16 19:49:06 $
* $Source: /usr/src/dos/RCS/cmos.c,v $
! * $Revision: 1.3 $
* $State: Exp $
*/
***************
*** 69,75 ****
cmos.subst[0x33] = 0xe1;
cmos.flag[0x33] = 1;
! warn("CMOS initialized: \n$Header: /usr/src/dos/RCS/cmos.c,v 1.2 1993/02/16 00:21:29 root Exp $\n");
}
--- 69,75 ----
cmos.subst[0x33] = 0xe1;
cmos.flag[0x33] = 1;
! warn("CMOS initialized: \n$Header: /usr/src/dos/RCS/cmos.c,v 1.3 1993/02/16 19:49:06 root Exp $\n");
}
***************
*** 137,143 ****
--- 137,156 ----
}
}
+ unsigned short BCD(int binval)
+ {
+ unsigned short tmp1, tmp2;
+
+ /* bit 2 of register 0xb set=binary mode, clear=BCD mode */
+ if (cmos.subst[0xb] & 4) return binval;
+
+ if (binval > 99) binval = 99;
+ tmp1=binval / 10;
+ tmp2=binval % 10;
+ return ((tmp1 << 4) | tmp2);
+ }
+
int cmos_date(int reg)
{
unsigned long ticks;
***************
*** 144,149 ****
--- 157,163 ----
struct timeval tp;
struct timezone tzp;
struct tm *tm;
+ int tmp;
/* get the time */
gettimeofday(&tp, &tzp);
***************
*** 155,179 ****
h_printf("CMOS: get date %d.%d.%d\n", tm->tm_mday, tm->tm_mon, tm->tm_year);
#endif
- /* is any of this correct?? */
switch(reg)
{
case 0: /* RTC seconds */
! return tm->tm_sec;
case 2: /* RTC minutes */
! return tm->tm_min;
! case 4: /* RTC hour */
! return tm->tm_hour;
case 6: /* RTC weekday */
! return tm->tm_wday;
case 7: /* RTC day of month */
! return tm->tm_mday; /* day of month */
case 8: /* RTC month */
if (cmos.flag[8]) return cmos.subst[8];
! else return tm->tm_mon;
case 9: /* RTC year */
if (cmos.flag[9]) return cmos.subst[9];
! else return tm->tm_year;
default:
h_printf("CMOS: cmos_time() register 0x%02x defaulted to 0\n",reg);
return 0;
--- 169,198 ----
h_printf("CMOS: get date %d.%d.%d\n", tm->tm_mday, tm->tm_mon, tm->tm_year);
#endif
switch(reg)
{
case 0: /* RTC seconds */
! return BCD(tm->tm_sec);
case 2: /* RTC minutes */
! return BCD(tm->tm_min);
! case 4: /* RTC hour...bit 1 of 0xb set=24 hour mode, clear 12 hour */
! tmp=BCD(tm->tm_hour);
! if (cmos.subst[0xb]&2) return tmp;
! else {
! if (tmp == 0) return 12;
! else if (tmp > 12) return tmp-12;
! }
! break;
case 6: /* RTC weekday */
! return BCD(tm->tm_wday);
case 7: /* RTC day of month */
! return BCD(tm->tm_mday);
case 8: /* RTC month */
if (cmos.flag[8]) return cmos.subst[8];
! else return BCD(tm->tm_mon);
case 9: /* RTC year */
if (cmos.flag[9]) return cmos.subst[9];
! else return BCD(tm->tm_year);
default:
h_printf("CMOS: cmos_time() register 0x%02x defaulted to 0\n",reg);
return 0;
***************
*** 191,193 ****
--- 210,213 ----
}
#undef CMOS_C
+
diff +context dosemu0.48/cmos.h dosemu0.48p1/cmos.h
*** dosemu0.48/cmos.h Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/cmos.h Thu Feb 18 19:12:14 1993
***************
*** 21,23 ****
--- 21,24 ----
};
#endif
+
diff +context dosemu0.48/disks.c dosemu0.48p1/disks.c
*** dosemu0.48/disks.c Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/disks.c Thu Feb 18 19:12:14 1993
***************
*** 106,108 ****
--- 106,109 ----
/* ^ cylinders */
/***********************************************************************/
#undef DISKS_C
+
diff +context dosemu0.48/dos.c dosemu0.48p1/dos.c
*** dosemu0.48/dos.c Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/dos.c Thu Feb 18 19:12:14 1993
***************
*** 1,12 ****
/* dos emulator, Matthias Lautner */
/* Extensions by Robert Sanders, 1992-93
*
! * $Date: 1993/02/05 02:54:02 $
* $Source: /usr/src/dos/RCS/dos.c,v $
! * $Revision: 1.5 $
* $State: Exp $
*
* $Log: dos.c,v $
* Revision 1.5 1993/02/05 02:54:02 root
* this is for 0.47.6
*
--- 1,16 ----
/* dos emulator, Matthias Lautner */
/* Extensions by Robert Sanders, 1992-93
*
! * $Date: 1993/02/18 18:53:41 $
* $Source: /usr/src/dos/RCS/dos.c,v $
! * $Revision: 1.6 $
* $State: Exp $
*
* $Log: dos.c,v $
+ * Revision 1.6 1993/02/18 18:53:41 root
+ * this is for 0.48patch1, mainly to fix the XMS bug (moved libemu up to
+ * the 1 GB mark), and to try out the faster termcap buffer-compare code.
+ *
* Revision 1.5 1993/02/05 02:54:02 root
* this is for 0.47.6
*
***************
*** 23,41 ****
* One day I should look into this, but for now, we'll just deal with
* the interruptions.
*
- * Revision 1.2 1993/01/11 21:26:48 root
- * just put some comments in.
- *
*/
#include <stdio.h>
- #define LIBSTART 0x400000
-
void (*dosemu)();
char dummy[1088*1024 + 64*1024]; /* ensure that the lower 1MB+64K is unused */
! /* the "+ 64*1024" reserves 64k second video buffer */
int main(int argc, char **argv)
{
--- 27,41 ----
* One day I should look into this, but for now, we'll just deal with
* the interruptions.
*
*/
#include <stdio.h>
void (*dosemu)();
char dummy[1088*1024 + 64*1024]; /* ensure that the lower 1MB+64K is unused */
! /* the "+ 64*1024" reserves 64k second video buffer...should be moved into
! * a simple malloc()ed global variable. dunno why I did it this way */
int main(int argc, char **argv)
{
***************
*** 46,48 ****
--- 46,49 ----
dosemu = (void *) LIBSTART;
dosemu(argc, argv);
}
+
diff +context dosemu0.48/dosvga.c dosemu0.48p1/dosvga.c
*** dosemu0.48/dosvga.c Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/dosvga.c Thu Feb 18 19:12:14 1993
***************
*** 1544,1546 ****
--- 1544,1547 ----
vga_setmode(mode);
}
+
diff +context dosemu0.48/dosvga.h dosemu0.48p1/dosvga.h
*** dosemu0.48/dosvga.h Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/dosvga.h Thu Feb 18 19:12:14 1993
***************
*** 54,56 ****
--- 54,57 ----
#endif /* VGA_H */
+
diff +context dosemu0.48/emu.c dosemu0.48p1/emu.c
*** dosemu0.48/emu.c Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/emu.c Thu Feb 18 19:12:14 1993
***************
*** 2,10 ****
#define EMU_C 1
/* Extensions by Robert Sanders, 1992-93
*
! * $Date: 1993/02/16 00:21:29 $
* $Source: /usr/src/dos/RCS/emu.c,v $
! * $Revision: 1.18 $
* $State: Exp $
*
* Revision 1.11 1993/01/25 22:59:38 root
--- 2,10 ----
#define EMU_C 1
/* Extensions by Robert Sanders, 1992-93
*
! * $Date: 1993/02/18 18:53:41 $
* $Source: /usr/src/dos/RCS/emu.c,v $
! * $Revision: 1.19 $
* $State: Exp $
*
* Revision 1.11 1993/01/25 22:59:38 root
***************
*** 69,74 ****
--- 69,75 ----
*outp++ = (c);
#define CHFLUSH if (outp > outbuf) { v_write(2, outbuf, outp - outbuf); \
outp = outbuf; }
+
#define SETIVEC(i, seg, ofs) ((us *)0)[ (i<<1) +1] = (us)seg; \
((us *)0)[ i<<1 ] = (us)ofs
***************
*** 94,100 ****
unsigned char outbuf[OUTBUFSIZE], *outp = outbuf;
int iflag;
int hdiskboot =0;
! int scrtest_bitmap;
long start_time;
unsigned long last_ticks;
int screen, xpos[8], ypos[8];
--- 95,104 ----
unsigned char outbuf[OUTBUFSIZE], *outp = outbuf;
int iflag;
int hdiskboot =0;
!
! int scrtest_bitmap, update_screen;
! unsigned char *scrbuf; /* the previously updated screen */
!
long start_time;
unsigned long last_ticks;
int screen, xpos[8], ypos[8];
***************
*** 297,304 ****
int dostputs(char *a, int b, outfuntype c)
{
/* discard c right now */
! CHFLUSH;
! tputs(a,b,outc);
}
void poscur(int x, int y)
--- 301,309 ----
int dostputs(char *a, int b, outfuntype c)
{
/* discard c right now */
! /* CHFLUSH; */
! /* was "CHFLUSH; tputs(a,b,outcbuf);" */
! tputs(a,b,c);
}
void poscur(int x, int y)
***************
*** 312,322 ****
int dx, dy, x, y, ofs;
us *sadr, *p, *q, blank = ' ' | (att << 8);
-
if(l==0) /* Wipe mode */
{
sadr=SCREEN_ADR(screen);
- /* must_update=1; */
for(dy=y0;dy<=y1;dy++)
for(dx=x0;dx<=x1;dx++)
sadr[dy*CO+dx]=blank;
--- 317,325 ----
***************
*** 325,330 ****
--- 328,334 ----
sadr = SCREEN_ADR(screen);
sadr += x0 + CO * (y0 + l);
+
dx = x1 - x0 +1;
dy = y1 - y0 - l +1;
ofs = -CO * l;
***************
*** 339,344 ****
--- 343,350 ----
p = sadr;
for (x=0; x<dx; x++, p++) *p = blank;
}
+
+ update_screen=1;
}
void scrolldn(int x0, int y0 , int x1, int y1, int l, int att)
***************
*** 349,359 ****
if(l==0)
{
l=LI-1; /* Clear whole if l=0 */
- /* must_update=1; */
}
sadr = SCREEN_ADR(screen);
sadr += x0 + CO * (y1 -l);
dx = x1 - x0 +1;
dy = y1 - y0 - l +1;
ofs = CO * l;
--- 355,365 ----
if(l==0)
{
l=LI-1; /* Clear whole if l=0 */
}
sadr = SCREEN_ADR(screen);
sadr += x0 + CO * (y1 -l);
+
dx = x1 - x0 +1;
dy = y1 - y0 - l +1;
ofs = CO * l;
***************
*** 368,373 ****
--- 374,381 ----
p = sadr;
for (x=0; x<dx; x++, p++) *p = blank;
}
+
+ update_screen=1;
}
v_write(int fd, unsigned char *ch, int len)
***************
*** 391,398 ****
xpos[s] = 0;
} else if (ch == '\n') {
ypos[s]++;
! /* is this correct? EDLIN needs it */
! xpos[s]=0;
} else if (ch == '\010' && xpos[s] > 0) {
xpos[s]--;
} else if (ch == '\t') {
--- 399,405 ----
xpos[s] = 0;
} else if (ch == '\n') {
ypos[s]++;
! xpos[s]=0; /* EDLIN needs this behavior */
} else if (ch == '\010' && xpos[s] > 0) {
xpos[s]--;
} else if (ch == '\t') {
***************
*** 406,414 ****
}
else {
if (ch >= ' ') {
sadr = SCREEN_ADR(s);
! sadr[ypos[s]*CO + xpos[s]++] = ch | (7 << 8);
if (s == screen) outc(trans[ch]);
} else if (ch == '\r') {
xpos[s] = 0;
--- 413,431 ----
}
else {
+ unsigned short *wscrbuf=(unsigned short *)scrbuf;
+
+ /* update_screen not set to 1 because we do the outputting
+ * ourselves...scrollup() and scrolldn() should also work
+ * this way, when I get around to it.
+ */
+ /* update_screen=1; */
+
if (ch >= ' ') {
sadr = SCREEN_ADR(s);
! sadr[ypos[s]*CO + xpos[s]] = ch | (att << 8);
! wscrbuf[ypos[s]*CO + xpos[s]] = ch | (att << 8);
! xpos[s]++;
if (s == screen) outc(trans[ch]);
} else if (ch == '\r') {
xpos[s] = 0;
***************
*** 415,420 ****
--- 432,438 ----
if (s == screen) write(2, &ch, 1);
} else if (ch == '\n') {
ypos[s]++;
+ xpos[s]=0; /* EDLIN needs this behavior */
if (s == screen) write(2, &ch, 1);
} else if (ch == '\010' && xpos[s] > 0) {
xpos[s]--;
***************
*** 447,458 ****
int lx, ly;
if (s > max_page) return;
if (!console_video)
if (s == screen) tputs(cl, 1, outc);
xpos[s] = ypos[s] = 0;
poscur(0,0);
! sadr = SCREEN_ADR(s);
! for (p = sadr; p < sadr+2000; *p++ = blank);
}
void restore_screen(void)
--- 465,477 ----
int lx, ly;
if (s > max_page) return;
+ sadr = SCREEN_ADR(s);
+ for (p = sadr; p < sadr+2000; *p++ = blank);
if (!console_video)
if (s == screen) tputs(cl, 1, outc);
xpos[s] = ypos[s] = 0;
poscur(0,0);
! update_screen=1;
}
void restore_screen(void)
***************
*** 461,468 ****
unsigned char c, a;
int x, y, oa;
! v_printf("RESTORE SCREEN\n");
if (console_video) {
v_printf("restore cancelled for console_video\n");
return;
--- 480,489 ----
unsigned char c, a;
int x, y, oa;
! update_screen=0;
+ v_printf("RESTORE SCREEN: scrbuf at 0x%08x\n", scrbuf);
+
if (console_video) {
v_printf("restore cancelled for console_video\n");
return;
***************
*** 472,477 ****
--- 493,509 ----
oa = 7;
p = sadr;
for (y=0; y<LI; y++) {
+ /* only update if line has changed..note that sadr is an unsigned
+ * short ptr, so CO is not multiplied by 2...I'll clean this up
+ * later.
+ */
+ if (! memcmp(scrbuf+y*CO*2,sadr+y*CO,CO*2) )
+ {
+ p+=CO; /* p is an unsigned short pointer */
+ continue;
+ }
+ else memcpy(scrbuf+y*CO*2,p,CO*2); /* scrbuf is a char ptr */
+
dostputs(tgoto(cm, 0, y), 1, outcbuf);
for (x=0; x<CO; x++) {
c = *(unsigned char *)p;
***************
*** 953,959 ****
*(char *)0xd0000=0x09;
*(char *)0xd0001=0x00; /* 9 byte table */
*(char *)0xd0002=0xFC; /* PC AT */
! *(char *)0xd0003=0x00;
*(char *)0xd0004=0x04; /* bios revision 4 */
*(char *)0xd0005=0x20; /* no mca no ebios no wat no keybint
rtc no slave 8259 no dma 3 */
--- 985,991 ----
*(char *)0xd0000=0x09;
*(char *)0xd0001=0x00; /* 9 byte table */
*(char *)0xd0002=0xFC; /* PC AT */
! *(char *)0xd0003=0x01;
*(char *)0xd0004=0x04; /* bios revision 4 */
*(char *)0xd0005=0x20; /* no mca no ebios no wat no keybint
rtc no slave 8259 no dma 3 */
***************
*** 1189,1194 ****
--- 1221,1227 ----
{
scrtest_bitmap = 1 << (24 + screen);
vm86s.screen_bitmap = -1;
+ update_screen=1;
}
return;
}
***************
*** 1839,1847 ****
CARRY;
return;
case 0xc0:
! g_printf("incomplete EXT. BIOS DATA AREA requested...\n");
! _regs.es=0xd000;
! _regs.ebx=0x0000; /* bios data area - see emulate.. */
return;
case 0xc1:
CARRY;
--- 1872,1887 ----
CARRY;
return;
case 0xc0:
! g_printf("Return system config parameters (int 15h, AH=0xc0)\n");
! if (mapped_bios)
! {
! _regs.es=0xf000;
! _regs.ebx=0xe6f5;
! }
! else {
! _regs.es=0xd000;
! _regs.ebx=0x0000; /* bios data area - see emulate.. */
! }
return;
case 0xc1:
CARRY;
***************
*** 2531,2537 ****
inalrm=1;
in_sighandler=1;
! if ((vm86s.screen_bitmap & scrtest_bitmap) && !running) {
running = 1;
restore_screen();
vm86s.screen_bitmap = 0;
--- 2571,2578 ----
inalrm=1;
in_sighandler=1;
! if ( ((vm86s.screen_bitmap & scrtest_bitmap) ||
! (update_screen && !console_video)) && !running) {
running = 1;
restore_screen();
vm86s.screen_bitmap = 0;
***************
*** 2539,2545 ****
running = 0;
}
! if (console_keyb && poll_io && !in_readkeyboard)
{
if (in_ioctl)
k_printf("not polling keyboard: in_ioctl: %d %04x %04x\n",
--- 2580,2586 ----
running = 0;
}
! if (poll_io && !in_readkeyboard)
{
if (in_ioctl)
k_printf("not polling keyboard: in_ioctl: %d %04x %04x\n",
***************
*** 3013,3018 ****
--- 3054,3063 ----
mapped_bios=0;
keybint=0;
+ /* allocate screen buffer for non-console video compare speedup */
+ scrbuf=malloc(CO*LI*2);
+ v_printf("VID: malloc'ed scrbuf at 0x%08x\n", scrbuf);
+
opterr=0;
while ( (c=getopt(argc, argv, "ABCfckm:D:pP:bH:F:VNtsgxK")) != EOF) {
switch(c) {
***************
*** 3147,3154 ****
termioInit();
hardware_init();
clear_screen(screen, 7);
! dbug_printf("$Header: /usr/src/dos/RCS/emu.c,v 1.18 1993/02/16 00:21:29 root Exp $\n");
! p_dos_str("Linux DOS emulator $Revision: 1.18 $ 1993\n\r");
p_dos_str("Mods by Robert Sanders, Alan Cox\n\r");
if (hdiskboot != 2)
boot(hdiskboot? hdisktab : disktab);
--- 3192,3199 ----
termioInit();
hardware_init();
clear_screen(screen, 7);
! dbug_printf("$Header: /usr/src/dos/RCS/emu.c,v 1.19 1993/02/18 18:53:41 root Exp $\n");
! p_dos_str("Linux DOS emulator $Revision: 1.19 $ 1993\n\r");
p_dos_str("Mods by Robert Sanders, Alan Cox\n\r");
if (hdiskboot != 2)
boot(hdiskboot? hdisktab : disktab);
***************
*** 3166,3171 ****
--- 3211,3217 ----
vm86s.flags = 0;
vm86s.screen_bitmap = 0;
scrtest_bitmap = 1 << (24 + screen);
+ update_screen=1;
for(;!error;) {
run_vm86();
***************
*** 3328,3334 ****
void usage(void)
{
! fprintf(stderr, "$Header: /usr/src/dos/RCS/emu.c,v 1.18 1993/02/16 00:21:29 root Exp $\n");
fprintf(stderr,"usage: dos [-ABCfckbVtspgxK] [-D flags] [-m SIZE] [-P FILE] [-H|F #disks] > doserr\n");
fprintf(stderr," -A boot from first defined floppy disk (A)\n");
fprintf(stderr," -B boot from second defined floppy disk (B) (#)\n");
--- 3374,3380 ----
void usage(void)
{
! fprintf(stderr, "$Header: /usr/src/dos/RCS/emu.c,v 1.19 1993/02/18 18:53:41 root Exp $\n");
fprintf(stderr,"usage: dos [-ABCfckbVtspgxK] [-D flags] [-m SIZE] [-P FILE] [-H|F #disks] > doserr\n");
fprintf(stderr," -A boot from first defined floppy disk (A)\n");
fprintf(stderr," -B boot from second defined floppy disk (B) (#)\n");
***************
*** 3386,3388 ****
--- 3432,3435 ----
}
#undef EMU_C
+
diff +context dosemu0.48/emu.h dosemu0.48p1/emu.h
*** dosemu0.48/emu.h Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/emu.h Thu Feb 18 19:12:14 1993
***************
*** 195,197 ****
--- 195,198 ----
static char RCSid[]="$Header: /usr/src/dos/RCS/emu.h,v 1.8 1993/02/13 23:37:20 root Exp $";
#endif /* EMU_H */
+
diff +context dosemu0.48/keymaps.c dosemu0.48p1/keymaps.c
*** dosemu0.48/keymaps.c Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/keymaps.c Thu Feb 18 19:12:14 1993
***************
*** 756,758 ****
--- 756,759 ----
#else
CONST unsigned char num_table[] = "789-456+1230,";
#endif
+
diff +context dosemu0.48/linuxfs.c dosemu0.48p1/linuxfs.c
*** dosemu0.48/linuxfs.c Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/linuxfs.c Thu Feb 18 19:12:14 1993
***************
*** 340,342 ****
--- 340,343 ----
}
return -1;
}
+
diff +context dosemu0.48/termio.c dosemu0.48p1/termio.c
*** dosemu0.48/termio.c Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/termio.c Thu Feb 18 19:12:14 1993
***************
*** 2,10 ****
#define TERMIO_C 1
/* Extensions by Robert Sanders, 1992-93
*
! * $Date: 1993/02/16 00:21:29 $
* $Source: /usr/src/dos/RCS/termio.c,v $
! * $Revision: 1.17 $
* $State: Exp $
*/
--- 2,10 ----
#define TERMIO_C 1
/* Extensions by Robert Sanders, 1992-93
*
! * $Date: 1993/02/18 18:53:41 $
* $Source: /usr/src/dos/RCS/termio.c,v $
! * $Revision: 1.19 $
* $State: Exp $
*/
***************
*** 454,460 ****
ioctl(kbd_fd, VT_ACTIVATE, other_no);
ioctl(kbd_fd, VT_ACTIVATE, console_no);
}
! dbug_printf("$Header: /usr/src/dos/RCS/termio.c,v 1.17 1993/02/16 00:21:29 root Exp $\n");
return 0;
}
--- 454,460 ----
ioctl(kbd_fd, VT_ACTIVATE, other_no);
ioctl(kbd_fd, VT_ACTIVATE, console_no);
}
! dbug_printf("$Header: /usr/src/dos/RCS/termio.c,v 1.19 1993/02/18 18:53:41 root Exp $\n");
return 0;
}
***************
*** 707,712 ****
--- 707,716 ----
open_kmem()
{
+ /* as I understad it, /dev/kmem is the kernel's view of memory,
+ * and /dev/mem is the identity-mapped (i.e. physical addressed)
+ * memory. Currently under Linux, both are the same.
+ */
if ((mem_fd = open("/dev/mem", O_RDWR) ) < 0) {
error("ERROR: can't open /dev/mem \n");
return (-1);
***************
*** 1533,1539 ****
put_queue(ctrl_cursor[sc]);
else if (kbd_flag(KF_NUMLOCK) || kbd_flag(KF_LSHIFT)
|| kbd_flag(KF_RSHIFT))
! put_queue(num_table[sc]);
else
put_queue(old_sc << 8);
}
--- 1537,1543 ----
put_queue(ctrl_cursor[sc]);
else if (kbd_flag(KF_NUMLOCK) || kbd_flag(KF_LSHIFT)
|| kbd_flag(KF_RSHIFT))
! put_queue((old_sc << 8) | num_table[sc]);
else
put_queue(old_sc << 8);
}
***************
*** 1562,1576 ****
static void func(unsigned int sc)
{
! /* should be pretty close to perfect
! * is the precedence right ? */
- static int fkey_table[]=
- {
- 0x3b, 0x3c, 0x3d, 0x3e, 0x41, 0x3f,
- 0x40, 0x42, 0x43, 0x44, 0x57, 0x58
- };
-
/* this checks for the VC-switch key sequence */
if (kbd_flag(EKF_LALT) && !kbd_flag(EKF_RALT) && !kbd_flag(KF_RSHIFT)
&& !kbd_flag(KF_LSHIFT) && !kbd_flag(KF_CTRL))
--- 1566,1574 ----
static void func(unsigned int sc)
{
! int fnum=sc-0x3a;
! if (fnum > 10) fnum -= 0x12; /* adjust if f11 or f12 */
/* this checks for the VC-switch key sequence */
if (kbd_flag(EKF_LALT) && !kbd_flag(EKF_RALT) && !kbd_flag(KF_RSHIFT)
&& !kbd_flag(KF_LSHIFT) && !kbd_flag(KF_CTRL))
***************
*** 1583,1603 ****
* been called from a signal handler, and ioctl() is not reentrant.
* hence the delay until out of the signal handler...
*/
! activate(sc-0x3a);
!
return;
}
if (kbd_flag(KF_LSHIFT) || kbd_flag(KF_RSHIFT))
! put_queue((sc + 0x19) << 8);
else if (kbd_flag(KF_CTRL))
! put_queue((sc + 0x23) << 8);
else if (kbd_flag(KF_ALT))
! put_queue((sc + 0x2d) << 8);
else
! put_queue(sc << 8);
}
int activate(int con_num)
{
if (in_ioctl)
--- 1581,1610 ----
* been called from a signal handler, and ioctl() is not reentrant.
* hence the delay until out of the signal handler...
*/
! activate(fnum);
return;
}
+ /* FCH (Fkey CHoose): returns a if n is f11 or f12, else it returns b
+ * PC scancodes for fkeys are "orthogonal" except F11 and F12.
+ */
+
+ #define FCH(n,a,b) ((n <= 10) ? a : b)
+
if (kbd_flag(KF_LSHIFT) || kbd_flag(KF_RSHIFT))
! put_queue( (sc + FCH(fnum,0x19,0x30)) << 8);
!
else if (kbd_flag(KF_CTRL))
! put_queue( (sc + FCH(fnum,0x23,0x32)) << 8);
!
else if (kbd_flag(KF_ALT))
! put_queue( (sc + FCH(fnum,0x2d,0x34)) << 8);
!
else
! put_queue( FCH(fnum,sc,sc+0x2e) << 8);
}
+
int activate(int con_num)
{
if (in_ioctl)
***************
*** 1762,1764 ****
--- 1769,1772 ----
}
/************* end of key-related functions *************/
#undef TERMIO_C
+
diff +context dosemu0.48/termio.h dosemu0.48p1/termio.h
*** dosemu0.48/termio.h Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/termio.h Thu Feb 18 19:12:14 1993
***************
*** 107,109 ****
--- 107,110 ----
#define SCRN_BUF_SIZE (0x10000) /* buffer of 64K */
#endif /* TERMIO_H */
+
diff +context dosemu0.48/timers.c dosemu0.48p1/timers.c
*** dosemu0.48/timers.c Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/timers.c Thu Feb 18 19:12:14 1993
***************
*** 50,52 ****
--- 50,53 ----
warn("TIMER: update value of %d\n", (40 / (1000000 / UPDATE)));
}
#undef TIMERS_C
+
diff +context dosemu0.48/timers.h dosemu0.48p1/timers.h
*** dosemu0.48/timers.h Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/timers.h Thu Feb 18 19:12:14 1993
***************
*** 33,35 ****
--- 33,36 ----
* is called */
#endif /* TIMERS_H */
+
diff +context dosemu0.48/xms.c dosemu0.48p1/xms.c
*** dosemu0.48/xms.c Thu Feb 18 19:28:03 1993
--- dosemu0.48p1/xms.c Thu Feb 18 19:12:14 1993
***************
*** 1,21 ****
/* xms.c for the DOS emulator
* Robert Sanders, gt8134b@prism.gatech.edu
*
! * $Date: 1993/02/16 00:21:29 $
* $Source: /usr/src/dos/RCS/xms.c,v $
! * $Revision: 1.3 $
* $State: Exp $
*
* $Log: xms.c,v $
* Revision 1.3 1993/02/16 00:21:29 root
* DOSEMU 0.48 DISTRIBUTION
*
- * Revision 1.2 1993/02/13 23:37:20 root
- * latest version, no time to document!
- *
- * Revision 1.1 1993/02/10 20:55:01 root
- * Initial revision
- *
* NOTE: I keep the BYTE size of EMB's in a field called "size" in the EMB
* structure. Most XMS calls specify/expect size in KILOBYTES.
*/
--- 1,19 ----
/* xms.c for the DOS emulator
* Robert Sanders, gt8134b@prism.gatech.edu
*
! * $Date: 1993/02/18 18:53:41 $
* $Source: /usr/src/dos/RCS/xms.c,v $
! * $Revision: 1.4 $
* $State: Exp $
*
* $Log: xms.c,v $
+ * Revision 1.4 1993/02/18 18:53:41 root
+ * this is for 0.48patch1, mainly to fix the XMS bug (moved libemu up to
+ * the 1 GB mark), and to try out the faster termcap buffer-compare code.
+ *
* Revision 1.3 1993/02/16 00:21:29 root
* DOSEMU 0.48 DISTRIBUTION
*
* NOTE: I keep the BYTE size of EMB's in a field called "size" in the EMB
* structure. Most XMS calls specify/expect size in KILOBYTES.
*/
***************
*** 27,33 ****
#include "emu.h"
#include "xms.h"
! static char RCSxms[]="$Header: /usr/src/dos/RCS/xms.c,v 1.3 1993/02/16 00:21:29 root Exp $";
extern int xms, vga, graphics, mapped_bios;
extern int extmem_size;
--- 25,39 ----
#include "emu.h"
#include "xms.h"
! /* 128*1024 is the amount of memory currently reserved in dos.c above
! * the 1 MEG mark. ugly. fix this.
! */
! #if (MAX_XMS*1024) >= (LIBSTART-1152*1024)
! #error "Your MAX_XMS is too large...it would overstep into libemu. \
! Try increasing LIBSTART in the Makefile, or better yet, decreasing MAX_XMS."
! #endif
!
! static char RCSxms[]="$Header: /usr/src/dos/RCS/xms.c,v 1.4 1993/02/18 18:53:41 root Exp $";
extern int xms, vga, graphics, mapped_bios;
extern int extmem_size;
***************
*** 48,54 ****
static struct Handle handles[NUM_HANDLES+1];
static int handle_count=0;
- static long handle_mask=0; /* 32 bits for 32 handles */
static int xms_grab_int15=0; /* non-version XMS call been made yet? */
--- 54,59 ----
***************
*** 82,88 ****
xms_grab_int15=0;
handle_count=0;
- handle_mask=0;
for (i=0; i<NUM_HANDLES+1; i++)
handles[i].valid=0;
}
--- 87,92 ----
***************
*** 113,119 ****
x_printf("XMS request HMA size 0x%04x\n", WORD(_regs.edx));
if (freeHMA)
{
! x_printf("XMS: allocating HMA\n");
freeHMA=0;
_regs.eax=1;
}
--- 117,123 ----
x_printf("XMS request HMA size 0x%04x\n", WORD(_regs.edx));
if (freeHMA)
{
! x_printf("XMS: allocating HMA size 0x%04x\n", WORD(_regs.edx));
freeHMA=0;
_regs.eax=1;
}
***************
*** 271,277 ****
}
/* total free is max allowable XMS - the number of K already allocated */
! _regs.eax = _regs.edx = MAX_XMS - (totalBytes / 1024);
LO(bx)=0; /* no error */
x_printf("XMS query free memory: %dK %dK\n", _regs.eax, _regs.edx);
--- 275,281 ----
}
/* total free is max allowable XMS - the number of K already allocated */
! _regs.eax = _regs.edx = extmem_size - (totalBytes / 1024);
LO(bx)=0; /* no error */
x_printf("XMS query free memory: %dK %dK\n", _regs.eax, _regs.edx);
***************
*** 299,305 ****
}
handles[h].lockcount=0;
handle_count++;
- handle_mask |= (1 << h); /* set mask for handle */
x_printf("XMS: allocated EMB %d at %08x\n", h, handles[h].addr);
--- 303,308 ----
***************
*** 326,332 ****
handles[h].size);
handles[h].valid=0;
handle_count--;
- handle_mask &= ~(1 << h); /* clear handle bit */
x_printf("XMS: free'd EMB %d\n", h);
_regs.eax=1;
--- 329,334 ----
***************
*** 620,622 ****
--- 622,625 ----
}
#undef XMS_C
+
diff +context dosemu0.48/xms.h dosemu0.48p1/xms.h
*** dosemu0.48/xms.h Thu Feb 18 19:28:04 1993
--- dosemu0.48p1/xms.h Thu Feb 18 19:12:14 1993
***************
*** 9,17 ****
#define XMS_MAGIC 0x0043
#define XMS_VERSION 0x0300 /* version 3.00 */
! #define XMS_DRIVER_VERSION 0x0002 /* my driver version 0.01 */
! #define NUM_HANDLES 32
#define FIRST_HANDLE 1
#define PARAGRAPH 16 /* bytes in a paragraph */
--- 9,17 ----
#define XMS_MAGIC 0x0043
#define XMS_VERSION 0x0300 /* version 3.00 */
! #define XMS_DRIVER_VERSION 0x0003 /* my driver version 0.03 */
! #define NUM_HANDLES 64
#define FIRST_HANDLE 1
#define PARAGRAPH 16 /* bytes in a paragraph */
***************
*** 42,44 ****
--- 42,45 ----
xms_init(void);
#endif /* XMS_H */
+